<template>
    <div class="container">
      <div
        v-for="j in 4"
        :key="j"
        class="loader"
        :style="{ '--j': j - 1 }"
      >
        <span
          v-for="i in 21"
          :key="i"
          :style="{ '--i': i - 1 }"
        ></span>
      </div>
    </div>
  </template>
  
  <script>
  export default {
    name: 'App'
  }
  </script>
  
  <style scoped>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  .container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #eff5ef;
    filter: hue-rotate(70deg);
  }
  
  .loader {
    position: relative;
    transform: rotate(calc(45deg * var(--j)));
  }
  
  .loader span {
    position: absolute;
    transform: rotate(calc(18deg * var(--i)));
  }
  
  .loader span::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid #00ff0a;
    border-radius: 2px;
    animation: animate 5s linear infinite;
    animation-delay: calc(-0.5s * var(--i));
  }
  
  .loader:nth-child(even) span::before {
    background-color: #00ff0a;
  }
  
  @keyframes animate {
    0% {
      transform: translateX(250px) scale(4);
      opacity: 0;
    }
  
    50% {
      opacity: 1;
    }
  
    100% {
      transform: translateX(-10px) scale(0);
    }
  }
  </style>
  